HTML elements are used to describe the structure of the page (e.g. headings, subheadings, paragraphs). They also provide semantic information (e.g. where emphasis should be placed, the definition of any acronyms used, when given text is a quotation).
CSS treats each HTML e XX lement as if it appears inside its own box and uses rules to indicate how that element should look. Rules are made up of selectors (that specify the elements the rule applies to) and declarations (that indicate what these elements should look like). Different types of selectors allow you to target your rules at different elements. Declarations are made up of two parts: the properties of the element that you want to change, and the values of those properties. For example, the font-family property sets the choice of font, and the value arial specifies Arial as the preferred typeface. CSS rules usually appear in a separate document, although they may appear within an HTML page.
A script is made up of a series of statements. Each statement is like a step in a recipe. Scripts contain very precise instructions. For example, you might specify that a value must be remembered before creating a calculation using that value. Variables are used to temporarily store pieces of information used in the script. Arrays are special types of variables that store more than one piece of related information. JavaScript distinguishes between numbers (0-9), strings (text), and Boolean values (true or false). Expressions evaluate into a single value. Expressions rely on operators to calculate a value.
You may be familiar with comparison operators from math class. Let’s make sure there aren’t any gaps in your knowledge.
Comparison operators allow us to assert the equality of a statement with JavaScript. For example, we can assert whether two values or expressions are equal with ===, or, whether one value is greater than another with >.
There are scenarios, however, in which we must assert whether multiple values or expressions are true. In JavaScript, we can use logical operators to make these assertions.
&& (and) — This operator will be truthy (act like true) if and only if the expressions on both sides of it are true. || (or) — This operator will be truthy if the expression on either side of it is true. Otherwise, it will be falsy (act like false).
The while loop loops through a block of code as long as a specified condition is true.
while (condition) {
// code block to be executed
}
The for loop has the following syntax:
for (statement 1; statement 2; statement 3) {
// code block to be executed
}
Thank you